<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <!-- 声明对象
  目的: 复习对象的声明
  要求:
  1. 声明一个变量per, 类型为对象类型
  2. 该对象的属性为性别,年龄,爱好(3个)
  3. 该对象的方法有 说话, 吃饭(2个)
  4. 在控制台分别调用该对象的属性和方法 -->
  <script>
    let per = {
      gender: '男',
      age: 20,
      hobby: 'basketball',
      say: function (lan) {
        return `我说${lan}`
      },
      eat: function (food) {
        return `今天晚上吃${food}`
      }
    }
    console.log(per.gender)
    console.log(per.age)
    console.log(per.hobby)
    let funca = per.say('哈哈哈')
    console.log(funca)
    let funcb = per.eat('罗非鱼')
    console.log(funcb)
  </script>
</body>

</html>